package cmd;

import tree.Tress;
import view.ViewTress;
import view.Leaf_AutoPlay;

class Cmd_StartAutoPlay extends Cmd {
    var tress : Tress;
    public function new(tress) {
        super();
        this.tress = tress;
    }

    override function Do() {
        super.Do();
        var leaf = new Leaf_AutoPlay();
        tress.AddLeaf(LAutoPlay, leaf);
        tress.PushLeaf(LAutoPlay);
    }

    override function Undo() {
        super.Undo();
        tress.PopLeaf();
        tress.RemoveLeaf(LAutoPlay);
    }
    
}